import { request } from '@/utils/request.js'

/**
* 提货订单明细 API JS
*/

export default {

/**
  * 获取提货订单明细分页列表
  * @returns
  */
getList (params = {}) {
  return request({
    url: 'prediction/orderDetail/index',
    method: 'get',
    params
  })
},

/**
  * 添加提货订单明细
  * @returns
  */
save (data = {}) {
  return request({
    url: 'prediction/orderDetail/save',
    method: 'post',
    data
  })
},

/**
  * 更新提货订单明细数据
  * @returns
  */
update (id, data = {}) {
  return request({
    url: 'prediction/orderDetail/update/' + id,
    method: 'put',
    data
  })
},

/**
  * 读取提货订单明细
  * @returns
  */
read (id) {
  return request({
    url: 'prediction/orderDetail/read/' + id,
    method: 'get',
    data
  })
},

/**
  * 将提货订单明细删除，有软删除则移动到回收站
  * @returns
  */
deletes (data) {
  return request({
    url: 'prediction/orderDetail/delete',
    method: 'delete',
    data
  })
},

/**
  * 从回收站获取提货订单明细数据列表
  * @returns
  */
getRecycleList (params = {}) {
  return request({
    url: 'prediction/orderDetail/recycle',
    method: 'get',
    params
  })
},

/**
  * 恢复提货订单明细数据
  * @returns
  */
recoverys (data) {
  return request({
    url: 'prediction/orderDetail/recovery',
    method: 'put',
    data
  })
},

/**
  * 真实删除提货订单明细
  * @returns
  */
realDeletes (data) {
  return request({
    url: 'prediction/orderDetail/realDelete',
    method: 'delete',
    data
  })
},

/**
  * 更改提货订单明细数据
  * @returns
  */
changeStatus (data = {}) {
  return request({
    url: 'prediction/orderDetail/changeStatus',
    method: 'put',
    data
  })
},

/**
  * 修改提货订单明细数值数据，自增自减
  * @returns
  */
numberOperation (data = {}) {
  return request({
    url: 'prediction/orderDetail/numberOperation',
    method: 'put',
    data
  })
},

/**
  * 提货订单明细导入
  * @returns
  */
importExcel (data = {}) {
  return request({
    url: 'prediction/orderDetail/import',
    method: 'post',
    data
  })
},

/**
  * 提货订单明细下载模板
  * @returns
  */
downloadTemplate () {
  return request({
    url: 'prediction/orderDetail/downloadTemplate',
    method: 'post',
    responseType: 'blob'
  })
},

/**
  * 提货订单明细导出
  * @returns
  */
exportExcel (params = {}) {
  return request({
    url: 'prediction/orderDetail/export',
    method: 'post',
    responseType: 'blob',
    params
  })
},

/**
  * 获取司机   getCarNoList   index
  * @returns
  */
getDrivers (params = {}) {
  return request({
    url: 'prediction/driver/getCarNoList',
    method: 'get',
    params
  })
},

/**
  * 司机派单
  * @returns
  */
addOrders (data = {}) {
  return request({
    url: 'prediction/deriverOrder/save',
    method: 'post',
    data
  })
},

 /**
   * 分单受理
   * @returns
   */

 getOdById (data = {}){
  return request({
    url: 'prediction/orderDetail/getOdById',
    method: 'post',
    data
  })
},
/**
  * 获取已绑定的司机
  * @returns
  */
getdriverOrder (params = {}) {
  return request({
    url: 'prediction/deriverOrder/getOrderCarList',
    method: 'get',
    params
  })
},

}